package cn.hncu.booksManagementSystem.user.ui;

import javax.swing.JPanel;
import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.SwingConstants;

import cn.hncu.booksManagementSystem.BMS_APP;

import java.awt.Color;

public class WelcomePanel extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@SuppressWarnings("unused")
	private JFrame mainFrame=null;
	/**
	 * Create the panel.
	 */
	public WelcomePanel(JFrame mainFrame) {
		this.mainFrame = mainFrame;
		BMS_APP.setMenuItemAllByActiveUser();
		setMinimumSize(new Dimension(800, 600));
		setLayout(null);
		
		JLabel lb1 = new JLabel(BMS_APP.activeUser.getName()+",成功登入图书管理系统");
		lb1.setForeground(Color.RED);
		lb1.setHorizontalAlignment(SwingConstants.CENTER);
		lb1.setFont(new Font("微软雅黑", Font.BOLD, 36));
		lb1.setBounds(164, 122, 464, 46);
		add(lb1);
		
		JLabel lb2 = new JLabel(BMS_APP.activeUser.getName()+",欢迎进入书店管理系统");
		lb2.setHorizontalAlignment(SwingConstants.CENTER);
		lb2.setForeground(Color.RED);
		lb2.setFont(new Font("微软雅黑", Font.BOLD, 36));
		lb2.setBounds(164, 268, 464, 46);
		add(lb2);
		
		JLabel lb3 = new JLabel(BMS_APP.activeUser.getName()+",请点击菜单进行操作");
		lb3.setHorizontalAlignment(SwingConstants.CENTER);
		lb3.setForeground(Color.RED);
		lb3.setFont(new Font("微软雅黑", Font.BOLD, 36));
		lb3.setBounds(164, 408, 464, 46);
		add(lb3);
		
	}
}
